/* Copyright (c) 2018 VMware, Inc. All rights reserved. -- VMware Confidential */

About Plugin Manifest Converter
Plugin manifest converter tool helps in converting your local plugin's plugin.xml manifest file to the remote plugin's
plugin.json manifest file which includes migrating all the supported extensions in the newer plugin.json manifest file.
This tool supports the latest SDK version of the plugin.xml manifest file for conversion but does not support the older
HTML Bridge-specific extensions of the plugin.xml manifest file.
The tool also ignores the property conditions and privilege constraints on the metadata of an extension as it is not supported in the sdk.

Apart from migrating the supported global and object related extension points which includes summary tab, configure tab,
monitor tab and action menus extensions,
1. The tool also parses the locale.properties files and copies the plugin specific locale properties to the plugin.json manifest file.
2. The tool also parses the plugin's css file to create a single sprite image of all the plugin specific icon images.
The plugin specific icon images are of size 32 x 32 px and the tool provides support for migrating icons of type for eg., png, svg (version 1.2) etc.
Note that support for migrating svg files of version 1.1 is not provided by the tool.

Output from Plugin Manifest Converter tool
The following files will be placed in the output directory provided in the --outputDir or -o option,
1. plugin.json      - The migrated plugin.json manifest file.
2. sprite-image.png - The single sprite image consisting of all the plugin specific icons used in the extensions.
                      The sprite image needs to be placed in the same location as it is specified in the plugin.json.
                      The recommended location is "assets/images/sprite-image.png" and it's path should be relative to the path of plugin.json.
3. report.txt       - Information or warning for the unsupported extensions used in local plugin.xml manifest file
                      which have not been converted by the plugin manifest converter tool.


Usages
Options for running the tool
 --projectDir or -p : Required path to the project directory which contains the plugin.xml, MANIFEST.MF, locale properties files
                      and plugin's css and images.
 --outputDir or -o  : Optional path to the output directory where the converted plugin.json, sprite image file and report.txt file are placed.
                      If this option is not specified then the converted files will be placed in the project directory specified with --projectDir or
                      -p option.
 --sdkVersion or -v : Optional property to specify the target sdk version for the manifest conversion. The default value is the initial
                      sdk version "1.0.0".
 --help or -h       : Provides help on the input options.


Sample command for running the tool:
Linux:
./plugin-manifest-converter.sh --projectDir [path to the project directory]  --outputDir [path to the output directory]

Windows:
plugin-manifest-converter.bat  --projectDir [path to the project directory]  --outputDir [path to the output directory]
